import { ref, computed, } from 'vue'
export const useDetails = (props?: any, initData?: any, emit?: any) => {
    const projectDetails = ref<any>(
        {
            guaranteeId: "123",//保单号
            itemName: "ww",//项目名称
            insuranceCompany: "人寿保险公司",//保险公司
            itemSite: "",//项目地址
            engineeringStartStop: "",//工程起止期
            insuranceStartStop: "",//保险起止期
            insureCost: "",//投保造价
            premium: "",//保费
            premiumRate: "",//费率
            insuranceScheme: "保险方案xxxxxxxx",//保险方案
            insurePeople: "",//投保人
            service: "",//安全服务机构
            guaranteeFile: "", //保单文件

            latentRisks: [{    //风险隐患
                imageUrl: "https://img01.yzcdn.cn/vant/cat.jpeg",
                latentName: "1",//隐患名称
                latentGrade: "",//隐患等级
                latentPart: "",//隐患部位
                findTime: "",//发现时间
                mend: true //已整改、（待整改）
            },
                {
                    imageUrl: "https://img01.yzcdn.cn/vant/cat.jpeg",
                    latentName: "2",//隐患名称
                    latentGrade: "",//隐患等级
                    latentPart: "",//隐患部位
                    findTime: "",//发现时间
                    mend: true //已整改、（待整改）
                }],
            assessmentReports: [//评估报告
                {

                    reportName: "1",//报告名称
                    reportTime: "",//报告时间
                    reportFile: "",//报告文件
                }, {

                    reportName: "2",//报告名称
                    reportTime: "",//报告时间
                    reportFile: "",//报告文件
                }
            ]
        }

    )

    // const detail = () => {
    //     return detailsList.value.
    //  }

    const show = ref(false);

    const showPopup = () => {
        show.value = true;
    }
    return {
        projectDetails,
        show,
        showPopup
    }
}